import {baseUrl}  from './config'
import {request,RequestConfig,HttpRequestMethod,LengyuHttpResponse,upload,PageRequestParam}  from '../utils/request'

export interface WorkOrderProc{
  id?:string,
  createTime?:string,
  updateTime?:string,
  title?:string,
  userId?:string,
  userVxOpenId?:string,
  imgUrlList?:string,
  description?:string,
  currentStatus?:string, 
}


// 将微信用户信息保存到数据库
export function save(workOrderProc:WorkOrderProc): Promise<LengyuHttpResponse> {
  workOrderProc.userVxOpenId=wx.getStorageSync('openId')
  workOrderProc.userId=wx.getStorageSync('userId')
  
  let requestConfig:RequestConfig={
    url:'/work-order-proc/save',
    method:HttpRequestMethod.POST,
    data:workOrderProc,
    token:true,
  }
  return request(requestConfig);
}

